<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:73:"D:\wwwroot\cms\template/member_style/default/member/user/wapmodel/bbs.htm";i:1609243498;}*/ ?>
<!--论坛贴子-->
<style type="text/css">
.bbs_title h3{
	width:50%;
	float:left;
	color:#999;
	border-bottom:#ddd 1px solid; 
}
.bbs_title h3 i{
	color:#999;
}
.bbs_title h3.ck i{
	color:#F90;	
}
.bbs_title h3.ck{
	color:#f90;
	border-bottom:#f90 1px solid; 
}
</style>
<?php if(modules_config('bbs')): ?>
<div class="SideInfos member_showbbs_title">
	<div class="bbs_title">
		<!--这里可以是多个TAB按钮-->
		<h3 class="ck"><i class="fa fa-fw fa-file-text-o"></i><?php echo $uid==$userdb['uid']?'我':'Ta'; ?>发表的主题</h3>
		<h3><i class="fa fa-fw fa-file-text-o"></i><?php echo $uid==$userdb['uid']?'我':'Ta'; ?>回复的贴子</h3>
	</div>
	<!--上面若有多个TAB按钮,那下面也要对应多个,必须要命名为了 class="show_content" 其中的 bbs_content_reply 为的是异步加载用的, 可以不使用 -->
	<div class="show_content">
	<?php if(defined('LABEL_DEBUG')): ?><!--QB <!--wap_member_homepage_002	bbs	--><?php if(is_array($__LIST__) || $__LIST__ instanceof \think\Collection || $__LIST__ instanceof \think\Paginator): $i = 0; $__LIST__ = $__LIST__;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$rs): $mod = ($i % 2 );++$i;?>
		<ul> <ol style="width:80%;"><span><?php echo $i; ?></span>、<a href="<?php echo $rs['url']; ?>"><?php echo get_word($rs['title'],24); ?></a></ol><li><?php echo date("m-d",$rs['create_time']); ?></li></ul>
	  <?php endforeach; endif; else: echo "" ;endif; ?> QB--><?php endif; $wap_member_homepage_002 = fun('label@run_label','wap_member_homepage_002',['union'=>'uid','uid'=>$uid,'val'=>'','conf'=>'','list'=>'rs','systype'=>'bbs','tpl'=>'','ifdata'=>1,'dirname'=>__FILE__,'rows'=>'8','class'=>'','order'=>'id','by'=>'desc','where'=>'','whereor'=>'','sql'=>"",'js'=>'','cache_time'=>'0' ,'mid'=>'1' ]); ?>
	</div>
	<div class="show_content bbs_content_reply" style="display:none;">
	<!--下面的标签添加js="bbs_content_reply"参数为的就是不影响页面打开速度。js名必须要与外层class名一样,但可以不与标签名一样-->
	<?php if(defined('LABEL_DEBUG')): ?><!--QB <!--wap_member_homepage_reply_002		--><?php if(is_array($__LIST__) || $__LIST__ instanceof \think\Collection || $__LIST__ instanceof \think\Paginator): $i = 0; $__LIST__ = $__LIST__;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$rs): $mod = ($i % 2 );++$i;?>
		<ul> <ol style="width:80%;"><span><?php echo $i; ?></span>、<a href="<?php echo $rs['url']; ?>"><?php echo get_word($rs['title'],24); ?></a></ol><li><?php echo date("m-d",$rs['create_time']); ?></li></ul>
	  <?php endforeach; endif; else: echo "" ;endif; ?> QB--><?php endif; $wap_member_homepage_reply_002 = fun('label@run_label','wap_member_homepage_reply_002',['union'=>'uid','uid'=>$uid,'val'=>'','conf'=>'','list'=>'rs','systype'=>'','tpl'=>'','ifdata'=>1,'dirname'=>__FILE__,'rows'=>'8','class'=>'app\bbs\model\Content@get_reply_label','order'=>'','by'=>'','where'=>'','whereor'=>'','sql'=>"",'js'=>'bbs_content_reply','cache_time'=>'0'  ]); ?>
	</div>
</div>
<?php endif; ?>
<script type="text/javascript">
var type_num = 0; //默认是第一项
$(document).ready(function () {
	$(".bbs_title h3").click(function(){
		$(".bbs_title h3").removeClass('ck');
		$(this).addClass('ck');
		type_num = $(this).index();
		$(".member_showbbs_title .show_content").hide();
		$(".member_showbbs_title .show_content").eq(type_num).show();
		scroll_get = true;	//避免其它加载完了,这里却无法加载
	});
});

var Mpage = new Array();	//页码数组
var urldb = new Array('<?php fun("label@label_ajax_url","wap_member_homepage_002",__FILE__); ?>','<?php fun("label@label_ajax_url","wap_member_homepage_reply_002",__FILE__); ?>'); //不同的URL
function ShowMoreBBs(){
	if( typeof Mpage[type_num]=='undefined' ){
		Mpage[type_num] = 1;
	}
	Mpage[type_num]++;
	var url = urldb[type_num] + Mpage[type_num];
	
	$.get(url,function(res){
		if(res.code==0){
			if(res.data==''){
				layer.msg("已经显示完了！",{time:500});
			}else{
				$(".member_showbbs_title .show_content").eq(type_num).append(res.data);
				set_i_num();
				scroll_get = true;
			}
		}else{
			layer.msg(res.msg,{time:2500});
		}
	});
}

//滚动显示更多
var scroll_get = true;	//做个标志,不要反反复复的加载
$(document).ready(function () {
	$(window).scroll(function () {
		if (scroll_get==true &&  (400 + $(window).scrollTop())>($(document).height() - $(window).height())) {
			scroll_get = false;
			layer.msg('内容加截中,请稍候',{time:1000});
			ShowMoreBBs();
		}
	});
});

//设置标题序号
function set_i_num(){
	var j = 0;
	$(".member_showbbs_title .show_content").eq(type_num).find('ul span').each(function(){
		j++;
		$(this).html(j);
	});
}

</script>